<template>
	<view class="yuyue">
		<view v-for="(item,index) in content" :key="index">
			<view style="background-color: #fff;padding: 10px;margin-bottom: 20px;border-radius: 10px;">
				<view style="display: flex;align-items: center;justify-content: space-between;">
					<span>权益人姓名：{{item.patientName}}</span>
					<span>权益人电话：{{item.contactNumber}}</span>
				</view>
				<view style="line-height: 30px;margin-top: 10px;">
					<p>预约权益名称：{{item.exclusiveRightsName}}</p>
					<p>预约医院：{{item.hospitalName}}</p>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		AppointmentList
	} from "@/api/system/user"
	export default {
		data() {
			return {
				option: {},
				currentItem: {},
				content: []
			}
		},
		onLoad: function(option) {
			this.option = option
			this.currentItem = JSON.parse(option.currentItem)
			this.getData()
		},
		methods: {
			async getData() {
				AppointmentList(this.currentItem.phoneNumber).then(res => {
					this.content = res.rows
					console.log(this.content)
				})
			}
		}
	}
</script>

<style>
.yuyue{
	padding: 10px;
	margin-bottom: 20px;
}
</style>